# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Sven Kauber, <celeon@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=encfs
pkgver=1.9.5
pkgrel=6
pkgdesc='Encrypted filesystem in user-space'
arch=('loong64' 'x86_64')
url='https://vgough.github.io/encfs/'
license=('LGPL')
depends=('openssl' 'fuse2' 'tinyxml2')
makedepends=('cmake')
source=(https://github.com/vgough/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz{,.asc})
# validpgpkeys=('E583187B2E26D6EF8BF4556333C65E29813C14DF') # Valient Gough
validpgpkeys=('FFF3E01444FED7C316A3545A895F5BC123A02740') # Jakob Unterwurzacher <jakobunt@gmail.com>
sha256sums=('4709f05395ccbad6c0a5b40a4619d60aafe3473b1a79bafb3aa700b1f756fd63'
            'SKIP')

build() {
  cmake -B build -S $pkgname-$pkgver \
      -DUSE_INTERNAL_TINYXML=OFF \
      -DINSTALL_LIBENCFS=ON \
      -DBUILD_SHARED_LIBS=ON \
      -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
}
